﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TanmiaGrp.Basis;

namespace TanmiaGrp.GeneralLedger.WinApp
{
    public class MainWindowViewModel : BaseViewModel
    {

        private Uri currentView;
        public Uri CurrentView
        {
            get { return currentView; }
            private set
            {
                if (currentView != value)
                {
                    currentView = value;
                    RaisePropertyChanged(() => CurrentView);
                }
            }
        }

        public MainWindowViewModel()
        {
            //CurrentView = Views.GroupBrowser;
            Events.UpdateCurrentView.Register<Uri>(OnUpdateCurrentView);
            Events.FloatWindowShown.Register<FloatWindow>(OnFloatWindowShown);
        }

        private void OnUpdateCurrentView(Uri uriPath)
        {
            CurrentView = uriPath;
        }

        protected override void OnCloseHandler(object sender)
        {

        }

        public void OnFloatWindowShown(FloatWindow window)
        {
            FloatWindow popoutWindow = window;

        }
    }
}
